﻿using UnityEngine;
using System.Collections;

public class shellObstacle : MonoBehaviour {

	int movimento = 1;


	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		transform.Translate(0.25f*movimento,0,0);
	}

	void OnCollisionEnter(Collision collision)
	{
		if(collision.gameObject.tag == "block") 
		{
			movimento = movimento*-1;
		}

	}
}
